home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 015a / cron250e.zip / MANUAL.DOC < prev    next >
Text File  |  1993-04-05  |  24KB  |  618 lines

  1.  
  2.  
  3.                                 CronJr ver 2.50
  4.  
  5.  
  6.  
  7.      Requirements
  8.      ------------
  9.  
  10.           MS-DOS based machine running MS-DOS 3.30 or higher.   MS-DOS
  11.      versions below 3.30 may be used, but are not recommended, since
  12.      they require CronJr to use more memory.
  13.  
  14.  
  15.      Background
  16.      ----------
  17.  
  18.           The reason for designing CronJr was for lack of anything
  19.      better in the MS-DOS world.  Simple but powerful programs like
  20.      cron  (part of AT&T's Unix) or Sleeper  (public domain for HP's
  21.      MPE)  are non existent for PC's.
  22.  
  23.           With more and more companies moving from mini-computers to
  24.      PC based LANs, one of the many things that has been lost was the
  25.      ability to schedule the nightly reporting and maintenance
  26.      programs needed to keep a business working during the day.
  27.  
  28.           Sure, it's possible to just write a large batch file that
  29.      will run all your programs one after another.  That solution is
  30.      fine if it meets your needs.  But if you need programs to run at
  31.      specific times, and especially if your business revolves around
  32.      a LAN, then this product is for you.
  33.  
  34.  
  35.      The solution
  36.      ------------
  37.  
  38.           There are 3 methods of scheduler implementation in a DOS
  39.      environment.
  40.  
  41.           Method 1
  42.  
  43.               Make a background RAM resident program that will pop
  44.               up when it is time to run a task.
  45.  
  46.           Method 2
  47.  
  48.               Make a foreground program that loads the task as a child
  49.               process.
  50.  
  51.           Method 3
  52.  
  53.               Make a transient program that is only in memory when it
  54.               is needed.  Therefore, all memory is available for the
  55.               task.
  56.  
  57.  
  58.                                        Page 1
  59.      Faults for method 1
  60.      --------------------
  61.  
  62.           The last thing the world needs is another RAM resident
  63.      program to eat up memory, steal clock cycles, and substitute
  64.      custom interrupt vectors.  Most LAN users already use 20-70k for
  65.      their network shell, and even more if they are running a NETBIOS
  66.      emulator.
  67.  
  68.           The way most resident schedulers work is to stuff the
  69.      keyboard when it is time to execute a task.  This method can be
  70.      seen in various automatic tape backup programs.  This method is
  71.      unreliable since the assumption is made that the DOS prompt is
  72.      available, the command line is clear, and the path is set.
  73.  
  74.      Faults for method 2
  75.      -------------------
  76.  
  77.           This method requires too much memory.  If you want to run a
  78.      batch file then you have to load another version of COMMAND.COM
  79.      on top of the parent scheduler.
  80.  
  81.      Why method 3 is so swell
  82.      ------------------------
  83.  
  84.           1. It is so simple.  It relies heavily on two simple
  85.              operating system level batch files.
  86.  
  87.           2. The scheduler is not in RAM while the task is running
  88.              thus all memory is available to the task(*).
  89.  
  90.           *  The dreaded asterisk - If you are using a DOS version
  91.              below 3.3 then around 23k is lost because COMMAND.COM
  92.              needs to be invoked a second time.  It is strongly
  93.              recommend that DOS 3.30 or above is used.
  94.  
  95.  
  96.      How it works
  97.      ------------
  98.  
  99.           1.  The schedule file CronJr.SCH is created by you. It
  100.      contains the timing parameters for the tasks to be executed.
  101.  
  102.           2. The master batch file, CronJr.BAT, is loaded from the
  103.      command line.  That is your last intervention.
  104.  
  105.           3. The work file, CronWk.BAT, is deleted by CronJr.BAT.
  106.  
  107.           4. The scheduler program, Cron.EXE, is loaded and the
  108.      schedule file CronJr.SCH is read.
  109.  
  110.           5. When the time comes to execute a process Cron.EXE dumps
  111.      its scheduling information to CronJr.JOB, writes the CronWk.BAT
  112.      file and unloads from memory to return control to CronJr.BAT.
  113.  
  114.                                        Page 2
  115.           6. If CronJr.BAT can find CronWk.BAT then the CronWk.BAT
  116.      work file is called/executed.
  117.  
  118.           7. Upon completion of CronWk.BAT, control is returned to
  119.      CronJr.BAT which then executes CronJr.BAT (thus ending the
  120.      original CronJr.BAT execution) with the parameter RELOAD which
  121.      is passed to Cron.EXE in step 4, which causes the file
  122.      CronJr.JOB to be loaded rather than the file CronJr.SCH .
  123.  
  124.  
  125.           Hard to follow?  Try this one.  It is the remedial version.
  126.  
  127.      CronJr.BAT -> Cron.EXE -> CronWk.BAT (YOUR TASK) ->CronJr.BAT
  128.           A.           B.            C.                     A.
  129.  
  130.  
  131.      Installation
  132.      ------------
  133.  
  134.           Create a directory for CronJr, any name will do, and copy
  135.      the Cron.EXE, EditCron.EXE and TimeNow.EXE programs into the new
  136.      directory.  If you are going to use CronJr on a LAN with multiple
  137.      machines running CronJr, then you must make a separate directory
  138.      for each machine.
  139.  
  140.           Examples:
  141.  
  142.               C:\CRON\386
  143.               F:\BOB
  144.               F:\ACCTNG\CRON
  145.  
  146.           Each directory must contain its own CronJr.SCH file and its
  147.      own unique CronJr.BAT file.  A path may be set to point to the
  148.      location of Cron.EXE.
  149.  
  150.           To see a list of startup command line parameters type Cron
  151.      without any parameters and all possible parameters will be shown.
  152.  
  153.           For each CronJr directory created, type Cron START at their
  154.      respective DOS prompt.  Such as:
  155.  
  156.               C:\CRON\386>cron start
  157.  
  158.           This will create the CronJr.BAT file which is specific to
  159.      its home directory.  If you type out the CronJr.BAT file you will
  160.      see how this file is unique to its home directory.
  161.  
  162.           Use the EditCron program to create or modify the CronJr.SCH
  163.      file.  The EditCron utility is fairly straight forward to use.
  164.      The keystrokes used for operation are listed on a command line
  165.      on the bottom of the screen.  The keys are <A>-Add , <D>-Delete,
  166.      <Enter>-Edit, <Esc>-Exit, page up/down and up/down arrow.
  167.  
  168.  
  169.  
  170.                                        Page 3
  171.           The EditCron utility will help prevent easily made common
  172.      mistakes, such as illegal scheduling times, misspelling of
  173.      abbreviations for the days of the week, and most importantly of
  174.      all, invalid drives, directories and program names.
  175.  
  176.           BE VERY CAREFULL when putting in hours.  If you are spanning
  177.      hours then you need to put different values into the hour fields,
  178.      otherwise put the same value into both hour fields.  You will
  179.      notice that the hour fields default to 0 when adding new records.
  180.      If you want something to run at the 9th hour then put the hours
  181.      in as 9-9, not the default value of 9-0.  If you put in 9-0 you
  182.      are spanning the hours 9, 10, 11... 22, 23 and 0.
  183.  
  184.           After setting up the CronJr.SCH file, type CronJr to start
  185.      the scheduler.
  186.  
  187.  
  188.      Installation Options
  189.      --------------------
  190.  
  191.           There are additional startup parameters such as DISABLE,
  192.      NOSAVER, LOG, Txx, and OS2 that can be used along with START.  All
  193.      installation options can be viewed by running  Cron  without any
  194.      paramters.
  195.  
  196.      DISABLE - disables the F1-DOS Shell for additional network security.
  197.      NOSAVER - turns off the screen saver.
  198.      LOG     - causes CronJr to make entries into the file called CronJr.LOG
  199.                each time a job starts and stops.  The TimeNow.EXE program
  200.                must be accessable for the log to be created.
  201.      OS2     - creates OS2 CMD files instead of BAT files.
  202.      Txxx    - T for Text, allows user defined screen saver text.
  203.  
  204.  
  205.      Spanning Hours
  206.      --------------
  207.  
  208.           Spanning hours allows you specify a range of hours in that a
  209.      task will run.  Lets say you have an incremental task that runs
  210.      every 15 minutes ( 15i ), but you only want it to run during
  211.      the business hours 9am through 5pm.  You would specify the hours
  212.      as 9-16.  Note that 16 is 16:00 which is 4pm.  Spanned hours are
  213.      inclusive.
  214.  
  215.           In addition to influencing incremental tasks, spanned hours
  216.      also influence non-incremental tasks.  The tasks will execute
  217.      once every hour at the specified minute for the hours specified.
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.                                        Page 4
  227.      CronJr.SCH File Format
  228.      ----------------------
  229.  
  230.           In the event you choose to use your own text editor to
  231.      modify the CronJr.SCH file, then make sure that it creates a flat
  232.      ASCII file without tabs.  Enter one task per line using the
  233.      following format.
  234.  
  235.      Minute  Hours  Day_Of_Month  Month  Day_Of_Week  Executable_&_Parms
  236.  
  237.      Example
  238.      -------
  239.  
  240.       50    16    *     *      MoTuWeThFr    f:\public\bin\killuser.EXE
  241.        0    17    *     *      MoTuWeThFr    f:\mtn_tape\databack.bat
  242.        0     5    *     *      Mo            g:\acctng\weekly.bat
  243.        0     1    1     *    SuMoTuWeThFrSa  G:\ACCTNG\MONTHEND.EXE
  244.        0     1    1     1    SuMoTuWeThFrSa  G:\ACCTNG\YEARLY.EXE
  245.       49    16    *     *      MoTuWeThFr    C:\FUNNY\GOHOME.EXE
  246.        2i    *    *     *      MoTuWeThFr    F:\stream\kevin.bat
  247.        0     1i   *     *      MoTuWeThFr    q:\hourly\bak2work.exe
  248.       15   9-16   *     *      MoTuWeThFr    c:\bin\chk_qtr.com
  249.       30    12    *     *          We        nopath.com
  250.        6    30    *     *    Su              u:\pali\t2tape.exe /a /optic
  251.       ---  ----  ---  -----  --------------  ----------------------------
  252.       Min  Hour  DOM  Month  Day_Of_Week     Executable_& Parms
  253.  
  254.  
  255.      Field definitions
  256.      -----------------
  257.  
  258.           Minute......: the minute of the hour you want your job
  259.                         to execute, 0 through 59.
  260.           Hours.......: the hour of the day in military time, 0
  261.                         through 23.  If you want to span hours, then
  262.                         you must separate hours with a dash "-"
  263.                         without any spaces between the hours and the
  264.                         dash.
  265.           Day_Of_Month: the day of the month 1 through 31.
  266.           Month.......: the month of the year 1 through 12.
  267.           Day_Of_Week.: the day of the week, SU MO TU WE TH FR SA.
  268.           Executable..: a DOS executable string, .BAT, .EXE, and
  269.                         .COM files with a maximum combined path of
  270.                         64 characters.  EXTENSIONS MUST BE USED!
  271.           Parameters..: optional parameters to be passed to the
  272.                         executable.  Maximum of 128 characters.
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.                                        Page 5
  282.  
  283.      Wild cards and increments
  284.      -------------------------
  285.  
  286.           *: Execute on every occurrence.  Not used by Day_Of_Week.
  287.              Not recommended for use with Minute.
  288.  
  289.           i: Execute in increments. Only applies to minute and hour.
  290.              The 7th line in the example shows 2i which means execute
  291.              in 2 minute increments.  In theory this task could be
  292.              executed 30 times a hour.  Obviously  *  must be used for
  293.              every level after the first i .
  294.  
  295.           Combinations of  i  in the minute and hour are not allowed.
  296.      Combinations of  i  and spanned hours are not allowed.
  297.  
  298.           If  i  is used with the hour, then the minute should be  * ,
  299.      otherwise execution will occur in  X  hours + Y minutes increments.
  300.  
  301.  
  302.      Launch time
  303.      -----------
  304.  
  305.           Task checking and launching occur on the 1st second of the
  306.      minute or whenever the  "E"  key is pressed.
  307.  
  308.  
  309.      Screen Saver
  310.      ------------
  311.  
  312.           The screen saver becomes active after 10 seconds of keyboard
  313.      inactivity.  The screen saver will always redraw the CronJr
  314.      screen once the time of day second hits 50.  The CronJr screen
  315.      can be displayed by pressing any key, such as the space bar.
  316.  
  317.           The screen saver can be disabled by using the NOSAVER
  318.      command when creating the CronJr.BAT file with the START command.
  319.  
  320.           The screen saver can be easily customized to display your company
  321.      name rather than "CronJr".  Use the "T" (Text) command when creating
  322.      the CronJr.BAT file with the START command.  An example would be:
  323.  
  324.      cron START tAcme
  325.  
  326.           To specify a name that incorporates spaces put the "T" command
  327.      in quotes such as:
  328.  
  329.      cron START "tAcme Explosives"
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.                                        Page 6
  337.      OS2 CMD file support
  338.      ---------------------
  339.  
  340.           DOS deals with BAT files and OS2 deals with CMD files.  CronJr
  341.      can be made to use CMD files instead of .BAT files by using the OS2
  342.      command when creating the CronJr.CMD file with the START command.
  343.      This is a VERY MINOR OS2 support feature.  CronJr is a native DOS
  344.      program and will run in a DOS window under OS2.
  345.  
  346.  
  347.      Multitasking Operating Systems
  348.      ------------------------------
  349.  
  350.           CronJr has been tested and succesfully operates under the
  351.      DesqView, Windows and OS2 environments.  CronJr should run under
  352.      other DOS multitaskers with no problem.  Whether or not the programs
  353.      that CronJr will be running will work is another problem altogether.
  354.  
  355.  
  356.      Software Updates
  357.      ----------------
  358.  
  359.           Whenever you receive a CronJr update, always make a backup
  360.      of all the files used by your current version of CronJr.  Once
  361.      you have backed up your files, delete or rename your Cron.EXE
  362.      and CronJr.BAT files.  Then copy the Cron.EXE program from the
  363.      distribution disk to its target directory, then run Cron START,
  364.      and any other parameters you so desire, to create the new
  365.      CronJr.BAT file .
  366.  
  367.  
  368.      EXTREMELY IMPORTANT
  369.      -------------------
  370.  
  371.           Be very careful when assigning launch times.  A "feature"
  372.      of CronJr is that it only launches tasks when Cron.EXE is
  373.      resident.
  374.  
  375.           For example:  You have 2 tasks set to execute at 19:00,
  376.      each takes 20 minutes to run, and few tasks scheduled at 19:15.
  377.      At 19:00 all 19:00 tasks are tagged for launching and the first
  378.      task will be launched at 19:00.  The 2nd task will be launched
  379.      when Cron.EXE is reloaded and thus effectively launched at 19:20.
  380.  
  381.           Well it is now 19:40 and all tasks scheduled from 19:01
  382.      through 19:40 have missed their launch window.
  383.  
  384.           To prevent this from happening you should do the following.
  385.      Schedule enough time between tasks.  The 19:15 tasks in the
  386.      example should have been set later to 20:00, or earlier to
  387.      19:00.  Had they been scheduled at 19:00 then they would have
  388.      run as part of the 19:00 launching.
  389.  
  390.           NOTE:  Incremental launchings are exempt from this "feature" .
  391.  
  392.                                        Page 7
  393.      Proper scheduling
  394.      -----------------
  395.  
  396.           The best way to debug a faulty schedule is to run Cron.EXE
  397.      instead of CronJr.BAT, and use the F1 key to exit to DOS.  At 
  398.      the DOS prompt, change the time to T-MINUS 10 seconds to launch,
  399.      such as 16:59:50 and then type EXIT to return to Cron.EXE .
  400.      Inspect the contents of the CronWk.BAT file that is created, 
  401.      and then try to run it from the DOS prompt.
  402.  
  403.           There is no limit to the number of tasks you can put into
  404.      the CronJr.SCH file.
  405.  
  406.  
  407.      Common problems
  408.      ---------------
  409.           CronJr is running, and exits to DOS and does nothing.
  410.              Problem: Running Cron instead of CronJr.
  411.              Problem: Did not run Cron START in the execution directory.
  412.  
  413.           CronJr does not execute the programs listed in CronJr.SCH
  414.              Problem: Could not find the programs.  Need to specify the
  415.                       path in the CronJr.SCH file or set a DOS path.
  416.              Problem: You did not specify .BAT, .CMD, .EXE, or .COM .
  417.              Problem: Your scheduling parameters are incorrect. Most
  418.                       likely day_of_the_week not included.  I.e. You
  419.                       are testing on Saturday a job you have set up
  420.                       to run Monday through Friday.
  421.  
  422.           CronJr plays this obnoxious fight song when it executes.
  423.              Problem: Running the evaluation version.
  424.  
  425.  
  426.      Licensing
  427.      ---------
  428.  
  429.           Every purchaser of CronJr is granted a site license.  One
  430.      purchased copy of CronJr may be used by anyone employed by your
  431.      company in the same building with no additional charges.  Once
  432.      you expand out of your building, you need to purchase another
  433.      copy.
  434.  
  435.  
  436.      Anomalies and Hints
  437.      -------------------
  438.  
  439.           There are two anomalies and one other point that you need
  440.      to remember.
  441.  
  442.           Anomaly 1.  CronJr only executes tasks on the 1st second
  443.      of the minute.  Example.  If you had 3 tasks that each take 5
  444.      seconds to complete, and they are all scheduled to launch at
  445.      19:00 then they will be effectively launched at 19:00, 19:01
  446.      and 19:02.  This feature was designed into the product.
  447.  
  448.                                        Page 8
  449.           Anomaly 2.  Anomaly 2 arises out of anomaly 1.  Example.
  450.      If you set up a schedule that has 3 jobs, each set to run in
  451.      increments of 10 minutes (10i * * * ...), you would assume that
  452.      they would execute at the 10, 20, 30, 40, 50, 00 minute clock
  453.      demarcations (assuming that the first launch minute was hh:00)
  454.      and always launch one after the other. In reality this is not
  455.      true.
  456.  
  457.           The first launching schedule would look like this.
  458.  
  459.              1a. Job #1 launches at the first available minute.
  460.  
  461.              2a. Job #2 launches at the first available minute
  462.                  after Job #1 completes.
  463.  
  464.              3a. Job #3 launches at first available minute after Job
  465.                  #2 completes.
  466.  
  467.           The second and subsequent launchings might look like this.
  468.  
  469.              1b. Job #1 launches 10 minutes after its's first
  470.                  launching or at the first available minute after
  471.                  Job #3 finishes or it may launch the first available
  472.                  minute after Job #1 if Job #1 takes more than 10
  473.                  minutes.
  474.  
  475.              2b. and 3b.  Who knows.
  476.  
  477.           The best way to get around this confusion is to do one of
  478.      three things.
  479.  
  480.           1. Carefully plan and test your incremental launchings.
  481.  
  482.           2. Rather than make your launchings incremental, make them
  483.              minute specific.  This may involve multiple line entries
  484.              into the CronJr.SCH file for he same job at different
  485.              times.
  486.  
  487.           3. Make Jobs 1, 2 and 3 one job.
  488.  
  489.           The one thing you must remember.  The CronJr.SCH file is
  490.      only loaded at the initial load time.  If you are running CronJr
  491.      on a LAN and CronJr is running on a remote machine and you modify
  492.      the remote machine's CronJr.SCH file,  the remote CronJr will not
  493.      reflect any of the changes made in the new CronJr.SCH file until
  494.      the remote CronJr is aborted and reloaded.
  495.  
  496.  
  497.      Network Security
  498.      ----------------
  499.  
  500.           Although disabling the F1-DOS Shell feature does enhance the
  501.      security of the product, we do recommend that you take further
  502.      steps to secure your system if your environment so dictates.
  503.  
  504.                                        Page 9
  505.           Many people use CronJr to backup their networks or route
  506.      their E-mail, or do other tasks that require Supervisor or
  507.      equivalent system access.  It would be quite simple for someone
  508.      to access the F1-DOS Shell and do what ever damage they want to
  509.      do.  It would also be simple for them to escape out of the CronJr
  510.      program all together and get a DOS prompt.
  511.  
  512.           Our recommendations for enhanced network security are as
  513.      follows.
  514.  
  515.           1. If your system has a keyboard lock, use it and take the
  516.              keys with you!
  517.  
  518.           2. Lock the room that contains the CronJr machine.
  519.  
  520.           3. Don't set up your CronJr machine as a Super User unless
  521.              it is really needed.
  522.  
  523.           4. Disable the F1-DOS Shell feature.
  524.  
  525.           5. Modify the CronJr.BAT program to add a LOGOUT command
  526.              just prior to the display of the "ECHO End CronJr Cycle" .
  527.              This will ensure that once the Cron program is exited,
  528.              the CronJr.BAT file will log itself out of the network
  529.              prior to returning to a usable DOS prompt.
  530.  
  531.           6. In addition to modifying the CronJr.BAT file to enable
  532.              system logout, incorporate one of the Ctrl-C or
  533.              Ctrl-Break handler programs into your system.  This will
  534.              prevent possible crooks from getting access to a
  535.              "Terminate Batch Job" prompt prior to execution of the
  536.              LOGOUT command.  Do not rely on the SET BREAK OFF/ON
  537.              command to be of any help.  We have heard of a public
  538.              domain system driver available on CIS called BREAK.SYS .
  539.              The BREAK.SYS driver is supposed to prevent Ctrl-C or
  540.              Ctrl-Break from interrupting a batch file.  We have never
  541.              tried these drivers, but we have been informed of these
  542.              drivers by some of our customers.
  543.  
  544.  
  545.      Getting legal
  546.      -------------
  547.  
  548.           Software Shorts hereby disclaims all warranties relating to
  549.      this software, whether expressed or implied, including without
  550.      limitation any implied warranties of merchantability or fitness
  551.      for a particular purpose.
  552.  
  553.           Software Shorts will not be liable for any special,
  554.      incidental, consequential, indirect or similar damages due to
  555.      loss of data or any other reason, even if Software Shorts or an
  556.      agent of Software Shorts has been advised of the possibility of
  557.      such damages.
  558.  
  559.  
  560.                                        Page 10
  561.           Software Shorts will not be liable for any damages due to
  562.      malicious third party augmentation of the executable program,
  563.      such as viruses.
  564.  
  565.           In no event shall Software Shorts's liability for any
  566.      damages ever exceed the price paid for the license to use
  567.      software, regardless of the form of the claim.  The person using
  568.      the software bears all risk as to the quality and performance of
  569.      the software.
  570.  
  571.           The CronJr software is the copyrighted property of Software
  572.      Shorts.
  573.  
  574.  
  575.      Acknowledgements
  576.      ----------------
  577.  
  578.      Unix, cron and AT&T are registered trademarks of American
  579.         Telephone and Telegraph Corporation.
  580.      MPE and HP are copyrights of Hewlett Packard Company.
  581.      Sleeper is available through INTEREX
  582.      MS-DOS and Windows are registered trademarks of Microsoft Corporation.
  583.      NetWare is a registered trademark of Novell Incorporated
  584.      OS2 is registered trademark of International Business Machines.
  585.      DesqView is a registered trademark of Quarterdeck Office Systems.
  586.  
  587.  
  588.           Software Shorts is not affiliated with any of the above
  589.      mentioned companies.
  590.  
  591.  
  592.      Technical Support
  593.      -----------------
  594.  
  595.           Questions can be sent to CompuServe ID 70731,2507 or faxed
  596.      to (714) 832-2391.
  597.  
  598.  
  599.      One last word
  600.      -------------
  601.  
  602.           Software Shorts is dedicated to the creation and
  603.      dissemination of short, single focus, utility programs for
  604.      programmers.  Hence the name Software Shorts ( no we don't make
  605.      swimwear! ).  Software Shorts utility programs may not be 
  606.      distributed by any individual or corporation as part of a 
  607.      commercial software release, or bundled with a turn key system 
  608.      unless the utility has been licensed to that individual or 
  609.      corporation for such distribution.
  610.  
  611.           The first version of CronJr was released in November of 1988.
  612.  
  613.  
  614.  
  615.  
  616.                                        Page 11
  617.  
  618.